package com.charlotte;

import com.charlotte.client.URLShortenerClient;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;

/**
 *
 * @author law
 */
public class URLShort 
{

    public static void main(String[] args) throws MalformedURLException, IOException 
    {
        URLShortenerClient client = new URLShortenerClient();
        com.charlotte.bean.URLShortenerShortBean result1 = client.createShortURL("https://code.google.com/p/url-s-client/source/browse/com.charlotte/src/com/charlotte/#charlotte%2Fclient%253Fstate%253Dclosed");
        System.out.println(result1.getKind());
        System.out.println(result1.getId());
        System.out.println(result1.getLongUrl());
        com.charlotte.bean.URLShortenerExpandBean result2 = client.createLongURL(result1.getId());
        System.out.println(result2.getKind());
        System.out.println(result2.getLongUrl());
        System.out.println(result2.getStatus());
        System.out.println(result2.getId());
    }
    
}
